home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 2
/
Atari Mega Archive CD - Volume 2.iso
/
minix
/
up1510b.tgz
/
up1510b
/
src
/
fs
/
mount.c.D
< prev
next >
Wrap
Text File
|
1990-07-25
|
4KB
|
143 lines
*** /tmp/,RCSt1022235 Wed Jul 25 13:48:53 1990
--- mount.c Mon Jul 23 10:36:29 1990
***************
*** 6,18 ****
*/
! #include "../h/const.h"
! #include "../h/type.h"
! #include "../h/error.h"
! #include "const.h"
! #include "type.h"
#include "buf.h"
#include "file.h"
#include "fproc.h"
- #include "glo.h"
#include "inode.h"
#include "param.h"
--- 6,14 ----
*/
! #include "fs.h"
! #include <sys/stat.h>
#include "buf.h"
#include "file.h"
#include "fproc.h"
#include "inode.h"
#include "param.h"
***************
*** 19,22 ****
--- 15,20 ----
#include "super.h"
+ FORWARD dev_t name_to_dev();
+
/*===========================================================================*
* do_mount *
***************
*** 28,36 ****
register struct inode *rip, *root_ip;
struct super_block *xp, *sp;
! dev_nr dev;
! mask_bits bits;
int r, found, loaded;
- extern struct inode *get_inode(), *eat_path();
- dev_nr name_to_dev();
/* Only the super-user may do MOUNT. */
--- 26,32 ----
register struct inode *rip, *root_ip;
struct super_block *xp, *sp;
! dev_t dev;
! mode_t bits;
int r, found, loaded;
/* Only the super-user may do MOUNT. */
***************
*** 103,108 ****
put_inode(rip);
put_inode(root_ip);
! if (loaded) unload_bit_maps(dev);
! do_sync();
invalidate(dev);
sp->s_dev = NO_DEV;
--- 99,104 ----
put_inode(rip);
put_inode(root_ip);
! if (loaded) (void) unload_bit_maps(dev);
! (void) do_sync();
invalidate(dev);
sp->s_dev = NO_DEV;
***************
*** 128,136 ****
register struct inode *rip;
struct super_block *sp, *sp1;
! dev_nr dev;
int count;
- dev_nr name_to_dev();
-
/* Only the super-user may do UMOUNT. */
if (!super_user) return(EPERM);
--- 124,130 ----
register struct inode *rip;
struct super_block *sp, *sp1;
! dev_t dev;
int count;
/* Only the super-user may do UMOUNT. */
if (!super_user) return(EPERM);
***************
*** 160,164 ****
if (sp != NIL_SUPER)
if (unload_bit_maps(dev) != OK) panic("do_umount", NO_NUM);
! do_sync(); /* force any cached blocks out of memory */
invalidate(dev); /* invalidate cache entries for this dev */
if (sp == NIL_SUPER) return(EINVAL);
--- 154,158 ----
if (sp != NIL_SUPER)
if (unload_bit_maps(dev) != OK) panic("do_umount", NO_NUM);
! (void) do_sync(); /* force any cached blocks out of memory */
invalidate(dev); /* invalidate cache entries for this dev */
if (sp == NIL_SUPER) return(EINVAL);
***************
*** 177,181 ****
* name_to_dev *
*===========================================================================*/
! PRIVATE dev_nr name_to_dev(path)
char *path; /* pointer to path name */
{
--- 171,175 ----
* name_to_dev *
*===========================================================================*/
! PRIVATE dev_t name_to_dev(path)
char *path; /* pointer to path name */
{
***************
*** 185,190 ****
register struct inode *rip;
! register dev_nr dev;
! extern struct inode *eat_path();
/* If 'path' can't be opened, give up immediately. */
--- 179,183 ----
register struct inode *rip;
! register dev_t dev;
/* If 'path' can't be opened, give up immediately. */
***************
*** 199,203 ****
/* Extract the device number. */
! dev = (dev_nr) rip->i_zone[0];
put_inode(rip);
return(dev);
--- 192,196 ----
/* Extract the device number. */
! dev = (dev_t) rip->i_zone[0];
put_inode(rip);
return(dev);